3.1.52 \(\int \frac {\sec ^4(c+d x)}{a+a \cos (c+d x)} \, dx\) [52]

3.1.52.1 Optimal result
3.1.52.2 Mathematica [B] (verified)
3.1.52.3 Rubi [A] (verified)
3.1.52.4 Maple [A] (verified)
3.1.52.5 Fricas [A] (verification not implemented)
3.1.52.6 Sympy [F]
3.1.52.7 Maxima [B] (verification not implemented)
3.1.52.8 Giac [A] (verification not implemented)
3.1.52.9 Mupad [B] (verification not implemented)

3.1.52.1 Optimal result

Integrand size = 21, antiderivative size = 103 \[ \int \frac {\sec ^4(c+d x)}{a+a \cos (c+d x)} \, dx=-\frac {3 \text {arctanh}(\sin (c+d x))}{2 a d}+\frac {4 \tan (c+d x)}{a d}-\frac {3 \sec (c+d x) \tan (c+d x)}{2 a d}-\frac {\sec ^2(c+d x) \tan (c+d x)}{d (a+a \cos (c+d x))}+\frac {4 \tan ^3(c+d x)}{3 a d} \]

output
-3/2*arctanh(sin(d*x+c))/a/d+4*tan(d*x+c)/a/d-3/2*sec(d*x+c)*tan(d*x+c)/a/ 
d-sec(d*x+c)^2*tan(d*x+c)/d/(a+a*cos(d*x+c))+4/3*tan(d*x+c)^3/a/d
 
3.1.52.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(368\) vs. \(2(103)=206\).

Time = 3.13 (sec) , antiderivative size = 368, normalized size of antiderivative = 3.57 \[ \int \frac {\sec ^4(c+d x)}{a+a \cos (c+d x)} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \left (6 \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )+\frac {1}{8} \cos \left (\frac {1}{2} (c+d x)\right ) \sec (c) \sec ^3(c+d x) \left (9 \cos (2 c+3 d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+9 \cos (4 c+3 d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+27 \cos (d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+27 \cos (2 c+d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )-9 \cos (2 c+3 d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-9 \cos (4 c+3 d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+48 \sin (d x)-12 \sin (2 c+d x)-6 \sin (c+2 d x)-6 \sin (3 c+2 d x)+20 \sin (2 c+3 d x)\right )\right )}{3 a d (1+\cos (c+d x))} \]

input
Integrate[Sec[c + d*x]^4/(a + a*Cos[c + d*x]),x]
 
output
(Cos[(c + d*x)/2]*(6*Sec[c/2]*Sin[(d*x)/2] + (Cos[(c + d*x)/2]*Sec[c]*Sec[ 
c + d*x]^3*(9*Cos[2*c + 3*d*x]*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 
9*Cos[4*c + 3*d*x]*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 27*Cos[d*x]* 
(Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - Log[Cos[(c + d*x)/2] + Sin[(c 
+ d*x)/2]]) + 27*Cos[2*c + d*x]*(Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] 
- Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]) - 9*Cos[2*c + 3*d*x]*Log[Cos[( 
c + d*x)/2] + Sin[(c + d*x)/2]] - 9*Cos[4*c + 3*d*x]*Log[Cos[(c + d*x)/2] 
+ Sin[(c + d*x)/2]] + 48*Sin[d*x] - 12*Sin[2*c + d*x] - 6*Sin[c + 2*d*x] - 
 6*Sin[3*c + 2*d*x] + 20*Sin[2*c + 3*d*x]))/8))/(3*a*d*(1 + Cos[c + d*x]))
 
3.1.52.3 Rubi [A] (verified)

Time = 0.59 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.98, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {3042, 3247, 25, 3042, 3227, 3042, 4254, 2009, 4255, 3042, 4257}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sec ^4(c+d x)}{a \cos (c+d x)+a} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right )^4 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )}dx\)

\(\Big \downarrow \) 3247

\(\displaystyle -\frac {\int -\left ((4 a-3 a \cos (c+d x)) \sec ^4(c+d x)\right )dx}{a^2}-\frac {\tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int (4 a-3 a \cos (c+d x)) \sec ^4(c+d x)dx}{a^2}-\frac {\tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {4 a-3 a \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^4}dx}{a^2}-\frac {\tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}\)

\(\Big \downarrow \) 3227

\(\displaystyle \frac {4 a \int \sec ^4(c+d x)dx-3 a \int \sec ^3(c+d x)dx}{a^2}-\frac {\tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {4 a \int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx-3 a \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx}{a^2}-\frac {\tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}\)

\(\Big \downarrow \) 4254

\(\displaystyle \frac {-\frac {4 a \int \left (\tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}-3 a \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx}{a^2}-\frac {\tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-3 a \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {4 a \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}-\frac {\tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}\)

\(\Big \downarrow \) 4255

\(\displaystyle \frac {-3 a \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {4 a \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}-\frac {\tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {-3 a \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {4 a \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}-\frac {\tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {-3 a \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )-\frac {4 a \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}-\frac {\tan (c+d x) \sec ^2(c+d x)}{d (a \cos (c+d x)+a)}\)

input
Int[Sec[c + d*x]^4/(a + a*Cos[c + d*x]),x]
 
output
-((Sec[c + d*x]^2*Tan[c + d*x])/(d*(a + a*Cos[c + d*x]))) + (-3*a*(ArcTanh 
[Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*d)) - (4*a*(-Tan[c + 
 d*x] - Tan[c + d*x]^3/3))/d)/a^2
 

3.1.52.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3227
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x 
_)]), x_Symbol] :> Simp[c   Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b   Int 
[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
 

rule 3247
Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*sin[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[(-b^2)*Cos[e + f*x]*((c + d*Sin[e + f*x])^( 
n + 1)/(a*f*(b*c - a*d)*(a + b*Sin[e + f*x]))), x] + Simp[d/(a*(b*c - a*d)) 
   Int[(c + d*Sin[e + f*x])^n*(a*n - b*(n + 1)*Sin[e + f*x]), x], x] /; Fre 
eQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[ 
c^2 - d^2, 0] && LtQ[n, 0] && (IntegerQ[2*n] || EqQ[c, 0])
 

rule 4254
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[Exp 
andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, 
 d}, x] && IGtQ[n/2, 0]
 

rule 4255
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) 
  Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] 
&& IntegerQ[2*n]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 
3.1.52.4 Maple [A] (verified)

Time = 1.04 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.28

method result size
norman \(\frac {\frac {\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}-\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}+\frac {25 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {8 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a d}-\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a d}\) \(132\)
derivativedivides \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {5}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2}-\frac {1}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {5}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2}}{d a}\) \(134\)
default \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {5}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2}-\frac {1}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {5}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2}}{d a}\) \(134\)
parallelrisch \(\frac {\left (27 \cos \left (d x +c \right )+9 \cos \left (3 d x +3 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\left (-27 \cos \left (d x +c \right )-9 \cos \left (3 d x +3 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+44 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\cos \left (d x +c \right )+\frac {7 \cos \left (2 d x +2 c \right )}{22}+\frac {4 \cos \left (3 d x +3 c \right )}{11}+\frac {1}{2}\right )}{6 a d \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) \(137\)
risch \(\frac {i \left (9 \,{\mathrm e}^{6 i \left (d x +c \right )}+9 \,{\mathrm e}^{5 i \left (d x +c \right )}+24 \,{\mathrm e}^{4 i \left (d x +c \right )}+24 \,{\mathrm e}^{3 i \left (d x +c \right )}+39 \,{\mathrm e}^{2 i \left (d x +c \right )}+7 \,{\mathrm e}^{i \left (d x +c \right )}+16\right )}{3 d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 a d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d a}\) \(147\)

input
int(sec(d*x+c)^4/(a+cos(d*x+c)*a),x,method=_RETURNVERBOSE)
 
output
(1/d/a*tan(1/2*d*x+1/2*c)^7-4/d/a*tan(1/2*d*x+1/2*c)+25/3/d/a*tan(1/2*d*x+ 
1/2*c)^3-8/d/a*tan(1/2*d*x+1/2*c)^5)/(tan(1/2*d*x+1/2*c)^2-1)^3+3/2/a/d*ln 
(tan(1/2*d*x+1/2*c)-1)-3/2/a/d*ln(tan(1/2*d*x+1/2*c)+1)
 
3.1.52.5 Fricas [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.20 \[ \int \frac {\sec ^4(c+d x)}{a+a \cos (c+d x)} \, dx=-\frac {9 \, {\left (\cos \left (d x + c\right )^{4} + \cos \left (d x + c\right )^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 9 \, {\left (\cos \left (d x + c\right )^{4} + \cos \left (d x + c\right )^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (16 \, \cos \left (d x + c\right )^{3} + 7 \, \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) + 2\right )} \sin \left (d x + c\right )}{12 \, {\left (a d \cos \left (d x + c\right )^{4} + a d \cos \left (d x + c\right )^{3}\right )}} \]

input
integrate(sec(d*x+c)^4/(a+a*cos(d*x+c)),x, algorithm="fricas")
 
output
-1/12*(9*(cos(d*x + c)^4 + cos(d*x + c)^3)*log(sin(d*x + c) + 1) - 9*(cos( 
d*x + c)^4 + cos(d*x + c)^3)*log(-sin(d*x + c) + 1) - 2*(16*cos(d*x + c)^3 
 + 7*cos(d*x + c)^2 - cos(d*x + c) + 2)*sin(d*x + c))/(a*d*cos(d*x + c)^4 
+ a*d*cos(d*x + c)^3)
 
3.1.52.6 Sympy [F]

\[ \int \frac {\sec ^4(c+d x)}{a+a \cos (c+d x)} \, dx=\frac {\int \frac {\sec ^{4}{\left (c + d x \right )}}{\cos {\left (c + d x \right )} + 1}\, dx}{a} \]

input
integrate(sec(d*x+c)**4/(a+a*cos(d*x+c)),x)
 
output
Integral(sec(c + d*x)**4/(cos(c + d*x) + 1), x)/a
 
3.1.52.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 205 vs. \(2 (97) = 194\).

Time = 0.21 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.99 \[ \int \frac {\sec ^4(c+d x)}{a+a \cos (c+d x)} \, dx=\frac {\frac {2 \, {\left (\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {16 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {15 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a - \frac {3 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} - \frac {9 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} + \frac {9 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} + \frac {6 \, \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{6 \, d} \]

input
integrate(sec(d*x+c)^4/(a+a*cos(d*x+c)),x, algorithm="maxima")
 
output
1/6*(2*(9*sin(d*x + c)/(cos(d*x + c) + 1) - 16*sin(d*x + c)^3/(cos(d*x + c 
) + 1)^3 + 15*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/(a - 3*a*sin(d*x + c)^2 
/(cos(d*x + c) + 1)^2 + 3*a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - a*sin(d* 
x + c)^6/(cos(d*x + c) + 1)^6) - 9*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1 
)/a + 9*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a + 6*sin(d*x + c)/(a*(co 
s(d*x + c) + 1)))/d
 
3.1.52.8 Giac [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.11 \[ \int \frac {\sec ^4(c+d x)}{a+a \cos (c+d x)} \, dx=-\frac {\frac {9 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {9 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} - \frac {6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} + \frac {2 \, {\left (15 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 16 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} a}}{6 \, d} \]

input
integrate(sec(d*x+c)^4/(a+a*cos(d*x+c)),x, algorithm="giac")
 
output
-1/6*(9*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a - 9*log(abs(tan(1/2*d*x + 1/2 
*c) - 1))/a - 6*tan(1/2*d*x + 1/2*c)/a + 2*(15*tan(1/2*d*x + 1/2*c)^5 - 16 
*tan(1/2*d*x + 1/2*c)^3 + 9*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 
 - 1)^3*a))/d
 
3.1.52.9 Mupad [B] (verification not implemented)

Time = 14.58 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.93 \[ \int \frac {\sec ^4(c+d x)}{a+a \cos (c+d x)} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a\,d}-\frac {3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}-\frac {5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-\frac {16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}^3} \]

input
int(1/(cos(c + d*x)^4*(a + a*cos(c + d*x))),x)
 
output
tan(c/2 + (d*x)/2)/(a*d) - (3*atanh(tan(c/2 + (d*x)/2)))/(a*d) - (3*tan(c/ 
2 + (d*x)/2) - (16*tan(c/2 + (d*x)/2)^3)/3 + 5*tan(c/2 + (d*x)/2)^5)/(a*d* 
(tan(c/2 + (d*x)/2)^2 - 1)^3)